package blackhouse.advanced;
public class Mykey
{
   private String name = null;
   private int age = 0;
   public Mykey(String name,int age)
   {
	   this.name = name;
	   this.age = age;
   }
   public boolean equals(Object obj)
   {
	   if (obj instanceof Mykey)
	   {
		   Mykey objTemp = (Mykey) obj;
		    return name.equals(objTemp.name)&& age ==objTemp.age;			 
	   }else{
		   return false;
	   }
   }
   public int hashCode(){
	   return name.hashCode()+age;
   }
   public String toString(){
	   return "name: "+name+" age:"+age;
   }
}
